<?php
	// SimNet is a Second Life(tm) sim mangement tool that was designed for Fermi Sandbox
    // Copyright (C) 2011 Arthur Fermi
	// 
    // This program is free software: you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation, either version 3 of the License.
	// 
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
	//
	// To receive a copy of this license please visit http://www.gnu.org/licenses/

	// You should not need to edit anything below this line.
	// Get Datbase Settings
	include 'simnet_dbconfig.php';
	
	//Set Variables
	$Date = $_GET['Date'];
	$Sim = $_GET['Sim'];
	$Staff = $_GET['Staff'];
	$Type  = $_GET['Type'];
	$Who = $_GET['Who'];
	$WhoKey = $_GET['WhoKey'];
	$BanLen = $_GET['BanLen'];
	$Reason = $_GET['Reason'];
	$Comment = $_GET['Comment'];
	
	// Connect to database
	$con = mysql_connect($Server, $UserName, $Password) or die("Could not connect to the server.  Error: " . mysql_error());
	mysql_select_db($database, $con) or die("Could not connect to the database.  Error: " . mysql_error());
	$sql = "INSERT INTO tblSimNet_Events 
	(tblEvent_Time,tblEvent_Sim,tblEvent_Staff,tblEvent_Type,tblEvent_Who,tblEvent_WhoKey,tblEvent_BanLen,tblEvent_Reason,tblEvent_Comment) VALUES ('$Date','$Sim','$Staff','$Type','$Who','$WhoKey','$BanLen','$Reason','$Comment')";
	if (!mysql_query($sql, $con)) 
	{
		die('Error: ' . mysql_error());
	}
	mysql_close($con);